#include <iostream>
#include <algorithm>
#include <cmath>
#include <math.h>

using namespace std;

double num[105];
int n;
const double EPSILON = 1e-6; 

// 指定排序规则
bool cmp(double a, double b) {
	double da = fabs(a - round(a));
	double db = fabs(b - round(b));
	
	if(fabs(da-db) < EPSILON) {
		return a < b;
	}
	return da < db;
}

int main()
{
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%lf", &num[i]);
	}
	
	sort(num, num+n, cmp);

	for(int i = 0; i < n; i++) {
        if(i != n-1) {
    		printf("%.6lf ", num[i]);
        } else {
		    printf("%.6lf\n", num[i]);
        }
	}
	
	return 0;
}
